import Vue from 'vue';
import Router from 'vue-router';
import Home from '../pages/Home.vue';
import Login from '../pages/Login.vue';
import User from '../pages/User.vue';
import EnterAgreement from '../pages/EnterAgreement.vue';
import Posters from '../pages/Posters.vue';
import Register from '../pages/Register.vue';
import RankingList from '../pages/RankingList.vue';
import InvitationCodeRegister from '../pages/InvitationCodeRegister.vue';

Vue.use(Router);

export default new Router({
  routes: [
    { path: '/', redirect: '/user' },
    { path: '/login', name: '登录', component: Login },
    { path: '/register/agreement', name: '入驻协议', component: EnterAgreement },
    { path: '/user', name: '个人中心', component: User },
    { path: '/posters', name: '海报', component: Posters },
    { path: '/register', name: 'Register', component: Register },
    { path: '/register/invitation_code', name: 'InvitationCodeRegister', component: InvitationCodeRegister },
    { path: '/rank', name: 'RankingList', component: RankingList }
  ]
});
